package com.xxx.springboot.pojo.bean;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 菜单树
 */
@Data
public class MenuVo {

    private Long id;  // ID
    private Long pId;   // 父ID
    private String name;  // 名称
    private Integer rank = 0;  // 排序
    private List<MenuVo> subMenus = new ArrayList<>();  // 子节点

    public MenuVo(Long id, Long pId, String name, Integer rank) {
        this.id = id;
        this.pId = pId;
        this.name = name;
        this.rank = rank;
    }

    public MenuVo(Long id, Long pId, String name) {
        this.id = id;
        this.pId = pId;
        this.name = name;
    }

}
